<?php
namespace app\admin\controller;

use think\Controller;

class Base extends Controller {

	public function _initialize() {
		$this->setConfig();
	}

	public function setConfig() {
		//判断缓存是否存在
		if (!\think\Cache::get("config")) {
			//设置缓存
			$Config = D("api/Configure");
			$res = $Config->setCache();
			session('config', $res);
		} else {
			session('config', S('config'));
		}
		return true;
	}
}
